package com.jianhua.backend.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;

/**
 * <p>
 * 记录套餐中包含的具体菜品及类型
 * </p>
 *
 * @author author
 * @since 2025-07-02
 */
@Getter
@Setter
@ToString
@TableName("package_dishes")
@Accessors(chain = true) // 支持链式调用
public class PackageDishes implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 关联记录ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 关联套餐ID
     */
    @TableField("package_id")
    @NotNull(message = "套餐ID不能为空")
    private Integer packageId;

    /**
     * 关联菜品ID
     */
    @TableField("dish_id")
    @NotNull(message = "菜品ID不能为空")
    private Integer dishId;

    /**
     * 菜品类型（main主菜/side配菜/drink饮品）
     */
    @TableField("dish_type")
    @NotNull(message = "菜品类型不能为空")
    private String dishType;

    /**
     * 包含数量
     */
    @TableField("quantity")
    @NotNull(message = "数量不能为空")
    private Integer quantity;
}